package com.qidian.buy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author 郭浩
 */
public class Item implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String title;

    private String image;

    private Long cost;

    private Long price;

    private Integer stock;

    private Long categoryId;

    private Date created;

    private Date updated;

    private Integer status;

    @TableField(exist = false)//配置exist为false,标记这个属性不做自动映射
    private List<Specifications> specificationsList;

    @TableField(exist = false)//配置exist为false,标记这个属性不做自动映射
    private ItemDesc itemDesc;

    public ItemDesc getItemDesc() {
        return itemDesc;
    }

    public void setItemDesc(ItemDesc itemDesc) {
        this.itemDesc = itemDesc;
    }

    public List<Specifications> getSpecificationsList() {
        return specificationsList;
    }

    public void setSpecificationsList(List<Specifications> specificationsList) {
        this.specificationsList = specificationsList;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }
    public Long getCost() {
        return cost;
    }

    public void setCost(Long cost) {
        this.cost = cost;
    }
    public Long getPrice() {
        return price;
    }

    public void setPrice(Long price) {
        this.price = price;
    }
    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }
    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }
    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }
    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Item{" +
                "id=" + id +
                ", title=" + title +
                ", image=" + image +
                ", cost=" + cost +
                ", price=" + price +
                ", stock=" + stock +
                ", categoryId=" + categoryId +
                ", created=" + created +
                ", updated=" + updated +
                ", status=" + status +
                "}";
    }
}
